<script>
export default {
  name: 'attractions'
}
</script>

<script setup>
import { ref } from 'vue'
import Search from '@/views/system/attractions/attractions-list/cpns/search.vue'
import Content from '@/views/system/attractions/attractions-list/cpns/content.vue'
import useAttractionsStore from '@/store/attractions/index.js'

const page = ref(1)
const size = ref(10)
//调用景点信息列表数据接口
const attractioStore = useAttractionsStore()
//获取景点信息信息列表
attractioStore.getAttractionsList(page.value, size.value)
//条件查询信息
const searchParamsBtnEmits = (searchParams) => {
  attractioStore.getAttractionsList(page.value, size.value, searchParams)
}

//重置参数搜索用户
const resetParamsBtnEmits = () => {
  attractioStore.getAttractionsList(page.value, size.value)
}
</script>

<template>
  <div class="user">
    <search
      @search-params-btn-emits="searchParamsBtnEmits"
      @reset-params-btn-emits="resetParamsBtnEmits"
    />
    <content :news-list="attractioStore.attractionsList.records" />
  </div>
</template>

<style scoped lang="less"></style>
